/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.container-flex{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-footer {
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.app-title {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
}

/* 视频容器样式 */
.video-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  justify-content: center;
}

.video-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 640px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px;
  position: relative;
}

.video-title {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: #3498db;
  text-align: center;
}

.video-element {
  width: 100%;
  height: auto;
  background-color: #222;
  border-radius: 4px;
}

/* 摄像头组件样式 */
.camera-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 比例 */
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
}

.camera-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #2c3e50;
  color: #fff;
}

.camera-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

/* 播放器组件样式 */
.player-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 比例 */
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
}

.player-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  z-index: 10;
}

.player-error button {
  margin-top: 10px;
  padding: 5px 15px;
  border: none;
  border-radius: 4px;
  background-color: #e74c3c;
  color: white;
  cursor: pointer;
}

.player-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #2c3e50;
  color: #fff;
}

.player-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

/* 状态指示器 */
.status {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

.status.idle {
  background-color: #ecf0f1;
  color: #7f8c8d;
}

.status.connecting {
  background-color: #f39c12;
  color: #fff;
}

.status.streaming {
  background-color: #2ecc71;
  color: #fff;
}

.status.stopping {
  background-color: #f39c12;
  color: #fff;
}

.status.stopped {
  background-color: #95a5a6;
  color: #fff;
}

.status.error {
  background-color: #e74c3c;
  color: #fff;
}

/* 控制按钮 */
.controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.start-btn, .stop-btn {
  padding: 12px 24px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.start-btn {
  background-color: #3498db;
  color: white;
}

.start-btn:hover:not(:disabled) {
  background-color: #2980b9;
}

.stop-btn {
  background-color: #e74c3c;
  color: white;
}

.stop-btn:hover:not(:disabled) {
  background-color: #c0392b;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .video-container {
    flex-direction: column;
  }
  
  .video-wrapper {
    max-width: 100%;
  }
} 